package com.xiaofeng.pochi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaofeng.pochi.common.Page;
import com.xiaofeng.pochi.pojo.SysLog;
import com.xiaofeng.pochi.pojo.SysUser;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: chc
 * @Date: 2022/07/22/22:38
 * @Description:
 */
public interface SysUserMapper extends BaseMapper<SysUser> {
    /**
     * 更新指定用户名的登陆时间为当前时间
     *
     * @param username
     */
    void updateLoginTime(String username);

    /**
     * 根据用户名查询用户
     *
     * @param username
     * @return
     */
    SysUser getByUsername(String username);

    /**
     * 更新状态值
     *
     * @param sysUser
     */
    void updateStatus(SysUser sysUser);


    /**
     * 根据page分页查询
     *
     * @param page
     * @return
     */
    List<SysUser> getByPage(Page<SysUser> page);

    /**
     * 根据page查询总数
     *
     * @param page
     * @return
     */
    Integer countByPage(Page<SysUser> page);


}

